subroutine fmi_t1en_imnie(fmi, iijka,& 
              t1, icore, fact)
!
use mod_size
use mod_orbit
use mod_iop
use mod_ioff 
implicit none
!
real*8, intent(in) :: fact
real*4, intent(in) :: fmi(*)
real*4, intent(in) :: iijka(*)
!
real*4, intent(inout) :: t1(*), icore(*)
!
integer :: i, j, a, b, nsize, i0, i1, i2
integer, external :: irpdso
real*8, external :: dnrm2
!this is to do fmi = fmi + t1(e,n)*iijka(m,n,i,e)
i0 = 1
i1 = i0 + nvvoo*isd
i2 = i1 + nvvoo*isd
!====AA
!iijka(MNIE)*t1(EN)+iijka(MnIe)*t1(en)
!call iexpso(iijka(ioi2(1)), icore(i0), popa, popa, 0, 1, popa, vrta, 1, 0, 1)
call myicopyso(iijka(ioi2(2)), icore(i0), nioi22)
call scalso(nioi22, 2.d0, icore(i0), 1)
call isymtrso(iijka(ioi2(2)), icore(i1), popa, popa, 1, 1, popa, vrta, 1, 0, 1) 
call axpyso(nioi22, -1.d0, icore(i1), 1, icore(i0), 1)
call sstgenso(icore(i0), icore(i1), nsize, popa, popa, popa, vrta, & 
               icore, 1, '1342')
call VpqmnVmnrs_to_Vpqrs(icore(i1), t1(ifvo(1)), 1, 1, vrta, popa, 1, &
              popa, popa, 1, zorb, zorb, 1, fmi(ifoo(1)), 1, fact, 1.d0)
!write(6,*)'norm of fmi', dnrm2(irpdso(1, popa, popa, 1), fmi(ifoo(1)), 1)
!
!call sstgenso(iijka(ioi2(2)), icore(i1), nsize, & 
!              popa, popb, popa, vrtb, icore, 1, '1342')
!call VpqmnVmnrs_to_Vpqrs(icore(i1), t1(ifvo(1)), 1, 1, vrtb, popb, 1, &
!              popa, popa, 1, zorb, zorb, 1, fmi(ifoo(1)), 1, fact, 1.d0)
!write(6,*)'norm of fmi', dnrm2(irpdso(1, popa, popa, 1), fmi(ifoo(1)), 1)
return
end
